<template>
  <div id="head-step">
    <div class="head-setp">
        <div class="setp">
          <div class="setp-tips-box">
            <span :class="{active:step>index}" v-for="(item,index) in stepText">{{item}}</span>
          </div>
          <div class="setp-dot-box">
            <span :class="[{'active':index<=step+(step-1)},{'setp-line':index%2===1}]" v-for="(item,index) in stepLine"></span>
            <!-- <span class="setp-line"></span>
              <span class=""></span>
            <span class="setp-line"></span>
              <span class=""></span>
            <span class="setp-line"></span>
            <span class=""></span> -->
          </div>
        </div>
    </div>
  </div>
</template>
<script>
export default {
  name: "head-step",
  props: {
    step: {
      type: Number,
      default: 1
    }
  },
  data: () => ({
    stepText: ['申请人信息', '车辆信息', '证件照片', '收货地址'],
    stepLine: ['1', '2', '3', '4', '5', '6', '7']
  }),
  methods: {
    methodName() {
      //
    }
  },
  computed: {
    // stepType() {
    //   return
    // }
  }
}
</script>
<style lang="stylus" scoped>
.setp-tips-box {
    padding-top: 25px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    width: 84%;
    margin: 0 auto;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
  }
  .setp-tips-box span {
    width: 75px;
    height: 21px;
    text-align: center;
    line-height: 21px;
    color: #999;
    font-size: 13px;
    display: inline-block;
    color: #999;
  }
  .setp-tips-box span.active {
    color: #2d4ed1;
    position: relative;
  }
  .setp-tips-box input::-webkit-input-placeholder {
    text-shadow: none;
    -webkit-text-fill-color: initial;
    -webkit-user-select: auto !important;
  }
  .setp-dot-box {
    width: 67%;
    margin: 0 auto;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    margin-top: 10px;
  }
  .setp-dot-box span {
    width: 14px;
    height: 14px;
    background: url('');
    background-size: 100% 100%;
    display: inline-block;
    position: relative;
  }
  .setp-dot-box span.active {
    background-image: url('');
    position: relative;
    background-size: 100% 100%;
  }

  .setp-dot-box span.setp-line {
    height: 1px;
    width: 45px;
    margin-top: 10px;
    position: relative;
    background: none;
  }
  .setp-line:after {
    display: block;
    position: absolute;
    left: 0px;
    bottom: 4px;
    content: " ";
    width: 100%;
    border-top: 1px solid #ccc;
  }
  .setp {
    height: 93px;
    width: 100%;
  }
</style>
